package com.practice.lambda.funcs;

import com.practice.lambda.entity.Employee;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * 最原始的方式获取筛选
 *
 * @author hd
 * @date 2022/1/28 10:42
 */
@Getter
public class GetAgeGreater35 {

    public List<Employee> getEmployeeListOver35(List<Employee> emps) {
        List<Employee> employees = new ArrayList<>();
        for (Employee emp : emps) {
            if (emp.getAge() > 35) {
                employees.add(emp);
            }
        }
        return employees;
    }


}
